package com.heima.behavior.controller;

import com.heima.behavior.entity.ApFollowBehavior;
import com.heima.behavior.service.IApFollowBehaviorService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * APP关注行为表 前端控制器
 * </p>
 *
 * @author itheima
 * @since 2022-07-06
 */
@RestController
@RequestMapping("/api/v1/follow_behavior")
@Api(tags = "APP关注行为表接口")
@CrossOrigin
public class ApFollowBehaviorController{

    @Autowired
    private IApFollowBehaviorService apFollowBehaviorService;


    /**
     * 根据实体ID查询是否关注
     * @param entryId
     * @return
     */
    @GetMapping("/{entryId}")
    public ApFollowBehavior findFollowBehavior(@PathVariable("entryId") Integer entryId){
        return apFollowBehaviorService.getByEntryId(entryId);
    }
}
